
import 'package:json_annotation/json_annotation.dart';

//定义生成的文件
part 'x_bean_grop.g.dart';

//设备
@JsonSerializable(explicitToJson: true) //当内部存在嵌套类时使用,不存在也可以使用
class XBeanGroupItem {
  //是否组头
  bool isGroupItem=false;
  //是否选中状态
  bool isUserSelect=false;

  String? id;
  String? text;

  /*
  XImageUtils.imageLocal('assets/images/login_logo.png',width: 45,height: 52)
   */
  String? image;
  String? selectImage;

  double? imageWidth;
  double? imageHeight;


  XBeanGroupItem({
    this.id,
    this.text,
    this.image,
    this.selectImage,
    this.imageWidth,
    this.imageHeight,
    this.isGroupItem=false,
    this.isUserSelect=false,
  });



  //添加固定格式: _$自定义的类名FromJson  _$自定义的类名ToJson
  factory XBeanGroupItem.fromJson(Map<String, dynamic> json) => _$XBeanGroupItemFromJson(json);
  Map<String, dynamic> toJson() => _$XBeanGroupItemToJson(this);



}
